package com.lx.patterns.decorator;

/**
 * @ClassName Egg
 * @Description: //todo
 * @Author: 落雪
 * @CreateDate: 2025/1/21 21:19
 * @UpdateUser: 落雪
 * @UpdateDate: 2025/1/21 21:19
 * @UpdateRemark:
 * @Version: 1.0
 */
public class Bacon extends Garnish{

    public Bacon(FastFood fastFood) {
        super( 2,"培根",fastFood);
    }

    @Override
    public double cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return getFastFood().getDesc()+super.getDesc();
    }
}
